public class TestFinally {

	public static void main(String[] args) {
		t1();
		try {
			t2();
		} catch (Exception e) {
		}
		t3();
		last();
	}

	private static void t2() {
		try {
			System.out.println("t2:in try...");
			throw new RuntimeException("eeeeee");
		} finally {
			System.out.println("t2:in finally...");
		}
	}

	private static void t3() {
		try {
			System.out.println("t3:in try...");
			throw new RuntimeException("eeeeee");
		} catch (Exception e) {
			System.out.println("t3:in catch...");
			return;
		} finally {
			System.out.println("t3:in finally...");
		}
	}

	private static void t1() {
		try {
			System.out.println("t1:in try...");
			return;
		} finally {
			System.out.println("t1:in finally...");
		}
	}

	/**
	 * no finally
	 */
	private static void last() {
		try {
			System.out.println("t4:in try...");
			System.exit(0);
		} finally {
			System.out.println("t4:in finally...");
		}
	}

}
